import { request } from 'umi';
/** 获取当前的用户信息 GET /api/user/current */

export async function currentUser(options) {
  return request('/api/user/current', {
    method: 'GET',
    ...(options || {}),
  });
}
/** 修改当前的用户信息 POST /api/user/updateInfo */

export async function updateInfo(body, options) {
  return request('/api/user/updateInfo', {
    method: 'POST',
    data: body,
    ...(options || {}),
  });
}
/** 给资源收藏 POST /api/user/addBookmark */

export async function addBookmark(body, options) {
  return request('/api/user/addBookmark', {
    method: 'POST',
    data: body,
    ...(options || {}),
  });
}
/** 取消资源收藏 POST /api/user/delBookmark */

export async function delBookmark(body, options) {
  return request('/api/user/delBookmark', {
    method: 'POST',
    data: body,
    ...(options || {}),
  });
}
/** 取消资源收藏 GET /api/user/getBookmarks */

export async function getBookmarks(options) {
  return request('/api/user/getBookmarks', {
    method: 'GET',
    ...(options || {}),
  });
}
/** 查看自己的资源推荐 GET /api/user/getMyLinks */

export async function getMyLinks(options) {
  return request('/api/user/getMyLinks', {
    method: 'GET',
    ...(options || {}),
  });
}
